﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucThemKhoaHoc.ascx.cs" Inherits="STT.Admin.UserControls.ucThemKhoaHoc" %>

<div id="content-header">
    <div id="breadcrumb">
        <a href="../Admin/Default.aspx?idpage=1" class="tip-bottom" data-original-title="Về bảng điều khiển">
            <i class="icon-home"></i>Trang chính
        </a>
        <a href="#" class="current">Quản lý khóa học-lớp học</a>
        <a href="../Admin/Default.aspx?idpage=tkhm" class="current">Thêm khóa học</a>
    </div>
</div>
<div class="widget-box collapsible">
    <div class="widget-title">
        <a href="#collapseOne" data-toggle="collapse" class="">
            <span class="icon"><i class="icon-th"></i></span>
            <h5>Nhập thông tin</h5>
        </a>
    </div>
    <div class="in collapse" id="collapseOne" style="height: auto;">
        <div class="widget-content nopadding">
            <div class="dataTables_wrapper" role="grid">
                <%-- Cac dieu kien tim kiem --%>
                <div class="container-fluid">
                    <div class="row-fluid">
                        <div class="control-group">
                            <label class="control-label">Tên khóa học: </label>
                            <div class="controls">
                                <asp:TextBox ID="txtTenKhoaHoc" runat="server" ></asp:TextBox>

                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ValidationExpression="^[\s\S]{0,50}$"
                                    ToolTip="Bạn chưa nhập tên khóa học" ForeColor="Red" Font-Bold="true" ControlToValidate="txtTenKhoaHoc"
                                    runat="server" ErrorMessage="(*)" ValidationGroup="dn"></asp:RequiredFieldValidator>
                            </div>
                        </div>
                        
                        <div class="control-group">
                            <label class="control-label">Địa điểm: </label>
                            <div class="controls">
                                <asp:TextBox ID="txtDiaDiem" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ValidationExpression="^[\s\S]{0,200}$"
                                    ToolTip="Bạn chưa nhập tên địa điểm " ForeColor="Red" Font-Bold="true" ControlToValidate="txtDiaDiem"
                                    runat="server" ErrorMessage="(*)" ValidationGroup="dn"></asp:RequiredFieldValidator>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">Thời gian bắt đầu: </label>
                            <div class="controls">
                                <asp:TextBox ID="txtThoiGianBatDau" runat="server" TextMode="Date" class="validate"
                                    data-validate="required"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" ToolTip="Bạn chưa nhập thời gian bắt đầu"
                                    ForeColor="Red" Font-Bold="true" ControlToValidate="txtThoiGianBatDau" runat="server"
                                    ErrorMessage="(*)" ValidationGroup="dn"></asp:RequiredFieldValidator>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">Thời gian kết thúc: </label>
                            <div class="controls">
                                <asp:TextBox ID="txtThoiGianKetThuc" runat="server" TextMode="Date" class="validate"
                                    data-validate="required"></asp:TextBox>
                                <asp:CompareValidator ID="cmpDate" Text="Thời gian kết thúc phải lớn hơn thời gian bắt đầu"
                                    ControlToValidate="txtThoiGianKetThuc" ForeColor="Red" Font-Bold="true"
                                    Type="Date" Operator="GreaterThan" runat="server" ValidationGroup="dn" />
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" ToolTip="Bạn chưa nhập thời gian kết thúc"
                                    ForeColor="Red" Font-Bold="true" ControlToValidate="txtThoiGianKetThuc" runat="server"
                                    ErrorMessage="(*)" ValidationGroup="dn"></asp:RequiredFieldValidator>
                            </div>
                        </div>

                        <div class="control-group">
                            <label class="control-label">Nội dung: </label>
                            <div class="controls">
                                <asp:TextBox ID="txtNoiDung" runat="server" class="mceAdvanced"></asp:TextBox>
                                <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator5" ToolTip="Bạn chưa nhập nội dung"
                                    ForeColor="Red" Font-Bold="true" ControlToValidate="txtNoiDung" runat="server"
                                    ErrorMessage="(*)" ValidationGroup="dn"></asp:RequiredFieldValidator>--%>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl">
                    <asp:Button ID="btThemMoi" runat="server" Text="Thêm mới" CssClass="btn btn-info"
                        OnClick="btThemMoi_Click" ValidationGroup="dn" />
                    <asp:Button ID="btLuu" ValidationGroup="dn" runat="server" Text="Sửa" CssClass="btn btn-info"
                        OnClick="btLuu_Click" />
                    <asp:Button ID="btHuy" runat="server" Text="Hủy" CssClass="btn btn-info" OnClick="btHuy_Click" />                
                </div>
            </div>
        </div>
    </div>
</div>


<script src="../../js/tinymce/tinymce.min.js"></script>
<script type="text/javascript">
    $(document).ready(function () {

        tfm_path = '../Admin/TinyFileManager.NET';

        tinymce.init({
            selector: ".mceAdvanced",
            theme: "modern",
            mode: "specific_textareas",
            convert_urls: false,
            encoding: "xml",
            language: 'vi_VN',
            font_formats: "Times New Roman=times new roman ,Arial=arial,helvetica,sans-serif;",
            fontsize_formats: "8pt 9pt 10pt 11pt 12pt 13pt 14pt 16pt 26pt 36pt",
            plugins: [
             "advlist autolink lists link image charmap print preview hr anchor pagebreak",
             "searchreplace wordcount visualblocks visualchars code fullscreen",
             "insertdatetime media nonbreaking save table contextmenu directionality",
             "emoticons template paste textcolor tinyfilemanager.net"
            ],
            toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent",
            toolbar2: "link image media | print preview | forecolor backcolor emoticons | fontselect fontsizeselect",            

            height:300,
        });
    });

    $('#<%= btHuy.ClientID%>').click(function () {
            $('input:not([type=submit])').val('');
            $('textarea').val('');
            $('#ctl01_txtChiTiet_ifr body').html('');
        });
</script>
